<template>
  <div>
    <p @click="login">登陆</p>
    <router-link to="/register" tag="p">注册</router-link>
  </div>
</template>
<script>
export default {
//   beforeRouteEnter(to, from, next)  {
//       if(localStorage.getItem('isLoging') === 'ok'){
//         next('/user/loging')
//       }else{
//         next()
//       }
//   }
  methods: {
    login(){
      this.$router.replace('/login')
    }
  }
}
</script>

<style lang="scss" scoped>
p{
          font-size: 12px;
          margin-top: 8px;
          float: left;
          font-weight: 700;
        }
</style>